<h5>
  <%= t('invite_users.results.heading') %>
</h5>
<hr />
<div class="results-wrap">
<% @invite_results.each do |result| %>
<%   if result[:status] == :user_exists %>
  <div class="alert alert-info" role="alert">
    <strong><%= result[:email] %></strong>
    &nbsp;-&nbsp;
    <%= t('invite_users.results.user_exists') %>
  </div>
<%   elsif result[:status] == :user_exists_and_in_team %>
  <div class="alert alert-info" role="alert">
    <strong><%= result[:email] %></strong>
    &nbsp;-&nbsp;
    <%= t('invite_users.results.user_exists_and_in_team',
          team: result[:team_name],
          role: result[:user_role_name]) %>
  </div>
<%   elsif result[:status] == :user_exists_unconfirmed_invited_to_team %>
  <div class="alert alert-info" role="alert">
    <strong><%= result[:email] %></strong>
    &nbsp;-&nbsp;
    <%= t('invite_users.results.user_exists_unconfirmed_invited_to_team',
          team: result[:team_name],
          role: result[:user_role_name]) %>
  </div>
<%   elsif result[:status] == :user_exists_invited_to_team %>
  <div class="alert alert-info" role="alert">
    <strong><%= result[:email] %></strong>
    &nbsp;-&nbsp;
    <%= t('invite_users.results.user_exists_invited_to_team',
          team: result[:team_name],
          role: result[:user_role_name]) %>
</div>
<%   elsif result[:status] == :user_created %>
  <div class="alert alert-success" role="alert">
    <strong><%= result[:email] %></strong>
    &nbsp;-&nbsp;
    <%= t('invite_users.results.user_created') %>
  </div>
<%   elsif result[:status] == :user_created_invited_to_team %>
  <div class="alert alert-success" role="alert">
    <strong><%= result[:email] %></strong>
    &nbsp;-&nbsp;
    <%= t('invite_users.results.user_created_invited_to_team',
          team: result[:team_name],
          role: result[:user_role_name]) %>
</div>
<%   elsif result[:status] == :user_invalid %>
  <div class="alert alert-danger" role="alert">
    <strong><%= result[:email] %></strong>
    &nbsp;-&nbsp;
    <%= t('invite_users.results.user_invalid') %>
  </div>
<%   end %>
<% end %>
<% if @too_many_emails %>
<%= t('invite_users.results.too_many_emails', nr: Constants::INVITE_USERS_LIMIT) %>
<% end %>
</div>
